package com.cuit.zuke.admin.service;

import com.cuit.zuke.admin.pojo.Admin;
import com.cuit.zuke.admin.pojo.Department;
import com.cuit.zuke.admin.pojo.ShowAdmin;
import com.cuit.zuke.admin.pojo.ShowDepartment;

import java.util.List;
import java.util.Map;

public interface AdminService {
    /*查询所有管理员*/
    List<Admin> queryAllAdmin(int currentPage, int pageSize);
    /*查询管理员的数量*/
    int adminTotal();
    /*查询每个管理员对应的role*/
    List<Long> queryAllRole(Long userId);
    /*查询每个管理员对应的部门名称*/
    String queryDepartName(Long departmentId);
    /*返回管理员列表展示内容*/
    Map<String, Object> queryShowAll(int currentPage, int pageSize);

    /*根据id查询管理员*/
    Admin queryUserById(Long userId);
    /*返回根据id查询的管理员*/
    List<ShowAdmin> queryShowOne(Long userId);

    /*查询所有部门*/
    List<Department> queryAllDepart();
    /*根据parent_id查询父部门*/
    Department queryFatherDepartByParentID(Long parentId);
    /*根据parent_id查询子部门*/
    List<Department> queryChildDepartByParentID(Long id);
    /*封装为ShowDepartment*/
    List<ShowDepartment> ShowDepartment();

    /*根据ChildDepartmentId获得管理员列表*/
    List<Admin> queryAdminByChildDepartmentId(Long departmentId, int currentPage, int pageSize);
    /*根据FatherDepartmentId获得管理员列表*/
    List<Admin> queryAdminByFatherDepartmentId(Long departmentId, int currentPage, int pageSize);
    /*根据ChildDepartmentId获得部门下的人数*/
    int queryAdminTotalByChildDepartmentId(Long departmentId);
    /*根据FatherDepartmentId获得部门下的人数*/
    int queryAdminTotalByFatherDepartmentId(Long departmentId);
    /*封装为show展示返回前台*/
    Map<String, Object> getShowByDepartmentId(Long departmentId, int currentPage, int pageSize);

    /*根据userid删除管理员*/
    void deleteAdmin(Long userId);
}
